$('.attachment-img>img').data('scale', true);
$('#showimg>img').data('scale', true);
$('.main').click(function(e) {
        if(!$(e.target).data('scale')){
           return 
        }
        let img_w = $(e.target).width()*2;
        let img_h = $(e.target).height()*2;
        let max_w = $(window).width()*0.90;
        let max_h = $(window).height()*0.95;
        img_w = img_w>max_w ? max_w:img_w;
        img_h = img_h>max_h ? max_h:img_h;
        $('#showimg').css({
            width: img_w,
            height: img_h
        });
        $('#meng').toggle();
        $('#showimg>img').prop('src', $(e.target).prop('src'))
});